(1) Field of the Invention
The present invention relates to priority control apparatuses and priority control methods, and particularly to a priority control apparatus which controls priority of plural first tasks that run on a first OS and plural second tasks that run on a second OS.
(2) Description of the Related Art
Conventionally, in an operating system (OS) which executes plural tasks, a priority is set for each of the tasks, and the order in which the tasks are to be executed is determined according to the priorities.
Priority inversion is known to occur in such an OS. Priority inversion shall be described hereinafter.
When execution of a high priority task is requested during the execution of a low priority task, judgment is performed as to whether or not a resource to be used by the high priority task is being used (locked) by the currently-executed low priority task. When the resource to be used by the high priority task is not locked by the currently-executed task, the task to be executed is switched, in accordance with the priorities, to the high priority task.
On the other hand, when the resource to be used by the high priority task is locked by the currently-executed task, the currently-executed low priority task continues to be executed, and the high priority task is executed after the low priority task is finished.
Here, when execution of a medium priority task (a task having a priority that is lower than that of the high priority task and higher than that of the low priority task) is requested during the execution of the low priority task, and a resource to be used by the medium priority task is not locked by the low priority task, the OS interrupts the execution of the low priority task and executes the medium priority task, in accordance with the priorities. In other words, a priority inversion occurs in which the medium priority task is executed before the high priority task which should have been executed ahead. Thus there is the problem that real-timeliness is inhibited by such priority inversion.
A priority control apparatus described in Japanese Unexamined Patent Application Publication No. 8-77025 (Patent Reference 1) is known as a priority control apparatus for handling such priority inversions.
In the priority control apparatus described in Patent Reference 1, the priority of the currently-executed low priority task is temporarily raised such that, even when the execution of the medium priority task is requested, the request is not accepted and the execution of the low priority task is continued. With this, after the execution of the low priority task is finished, the high priority task is executed. In other words, the priority control apparatus is able to resolve the above-described priority inversion.
Meanwhile, recent years have seen the use of a computer system which runs plural OSs for implementing functions having different purposes. An example would be the case of running Windows® on Linux®.